using System;
using System.Collections.Generic;


namespace Gfw.Models.Stock
{
	[Serializable]
	public partial class StkRunstatus: IEquatable<StkRunstatus>
	{

		#region Private Members

		private string _id; 
		private string _userid; 
		private int _operationtype; 
		private DateTime? _operationdate; 
		private string _description; 		
		#endregion

		#region Constructor

		public StkRunstatus()
		{
			_id = String.Empty; 
			_userid = String.Empty; 
			_operationtype = 0; 
			_operationdate = null; 
			_description = String.Empty; 
		}
		#endregion // End of Default ( Empty ) Class Constuctor

		#region Public Properties
			
		public virtual string Id
		{
			get
			{ 
				return _id;
			}

			set	
			{	
				if( value == null )
					throw new ArgumentOutOfRangeException("Null value not allowed for Id", value, "null");
				
				if(  value.Length > 40)
					throw new ArgumentOutOfRangeException("Invalid value for Id", value, value.ToString());
				
				_id = value;
			}
		}
			
		public virtual string UserId
		{
			get
			{ 
				return _userid;
			}

			set	
			{	
				if(  value != null &&  value.Length > 40)
					throw new ArgumentOutOfRangeException("Invalid value for UserId", value, value.ToString());
				
				_userid = value;
			}
		}
			
		public virtual int OperationType
		{
			get
			{ 
				return _operationtype;
			}
			set
			{
				_operationtype = value;
			}

		}
			
		public virtual DateTime? OperationDate
		{
			get
			{ 
				return _operationdate;
			}
			set
			{
				_operationdate = value;
			}

		}
			
		public virtual string Description
		{
			get
			{ 
				return _description;
			}

			set	
			{	
				if(  value != null &&  value.Length > 256)
					throw new ArgumentOutOfRangeException("Invalid value for Description", value, value.ToString());
				
				_description = value;
			}
		}
			
				
		#endregion 

		#region Public Functions

		#endregion //Public Functions

		#region IEquatable members

		public virtual bool Equals(StkRunstatus other)
		{
			if (other == this)
				return true;
		
			return ( other != null ) &&
				( this._id == other.Id );
				   
		}

		#endregion
		
	}
}
